/// 后台子账号创建参数
class BackendUserCreateDto {
  /// 用户名
  final String userName;
  /// 密码
  final String password;
  /// 角色ID
  final int roleId;
  /// 邮箱
  final String email;

  BackendUserCreateDto({
    required this.userName,
    required this.password,
    required this.roleId,
    required this.email,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['userName'] = userName;
    data['password'] = password;
    data['roleId'] = roleId;
    data['email'] = email;
    return data;
  }

  factory BackendUserCreateDto.fromJson(Map<String, dynamic> json) {
    return BackendUserCreateDto(
      userName: json['userName'],
      password: json['password'],
      roleId: json['roleId'],
      email: json['email'],
    );
  }
}